<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    String categoryType = request.getParameter("type");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">

    <title>创建考试</title>
    <link type="text/css" href="<%=basePath%>/css/base.css" rel="stylesheet"/>
    <script type="text/javascript" src="<%=basePath%>/js/jquery.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/menu.js"></script>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script type="text/javascript" src="<%=basePath%>/js/jquery.min.js"></script>
    <link href='<%=basePath%>/css/bootstrap-2.3.2.css' rel='stylesheet'>
    <link href='<%=basePath%>/css/bootstrap-datetimepicker.min.css' rel='stylesheet'>
    <script type="text/javascript" src="<%=basePath%>/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="<%=basePath%>/js/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script src='<%=basePath%>dwr/util.js' type="text/javascript"></script>
    <script src='<%=basePath%>dwr/engine.js' type="text/javascript"></script>
    <script src='<%=basePath%>dwr/interface/subjectService.js' type="text/javascript"></script>
    <script src='<%=basePath%>dwr/interface/testPaperInfoService.js' type="text/javascript"></script>
    <script src='<%=basePath%>js/subject.js' type="text/javascript"></script>
    <script src='<%=basePath%>/js/testPaper.js' type="text/javascript"></script>

    <script src='<%=basePath%>dwr/interface/teamsService.js' type="text/javascript"></script>
    <script src='<%=basePath%>/js/teams.js' type="text/javascript"></script>
    <script type="text/javascript" src="<%=basePath%>/js/icheck.js"></script>

    <link href="<%=basePath%>/css/custom.css" rel="stylesheet">
    <link href="<%=basePath%>/css/line/_all.css" rel="stylesheet">

    <style type="text/css">
        table {
            margin: 0 auto;
        }

        table tr td {
            height: 15px;
        }

        #content .edui-default table {
            margin: 0 auto;
        }


    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.skin-line input').each(function () {
                var self = $(this),
                        label = self.next(),
                        label_text = label.text();

                label.remove();
                self.iCheck({
                    checkboxClass: 'icheckbox_line-blue',
                    radioClass: 'iradio_line-blue',
                    insert: '<div class="icheck_line-icon"></div>' + label_text
                });
            });
            testPaperInfoService.findPaperInfoByUser("${person.accout}", findTestPaper);
            $('.form_datetime').datetimepicker({
                language: 'zh-CN',
                weekStart: 1,
                todayBtn: 1,
                autoclose: 1,
                todayHighlight: 1,
                startView: 2,
                forceParse: 0
            });
            $('.form_time').datetimepicker({
                weekStart: 1,
                autoclose: 1,
                todayHighlight: 1,
                startView: 1,
                minView: 0,
                maxView: 1,
                forceParse: 0
            });
        });


    </script>
</head>

<body>
<%@ include file="/page/share/menu.jsp" %>

<div id="content">
    <form action="Examination.action" method="post">
        <fieldset>
            <table>
                <input type="hidden" name="creator" value="${person.accout}"/>
                <tr>
                    <td align="right">
                        考试名称：
                    </td>
                    <td>
                        <input type="text" name="name" class="form-control" style="width: 250px;"/>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        考试描述：
                    </td>
                    <td>
                        <input type="text" name="description" class="form-control" style="width: 250px;"/>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        科目：
                    </td>
                    <td>
                        <select name="subject" id="subject" style="width: 250px;height: 40px;font-size: 18px;" class="form-control">
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="examBeginTime" class=" control-label" style="font-weight: normal;float: right;">开始时间：</label></td>
                    <td>
                        <div class="input-group date form_datetime" data-date="" data-date-format="yyyy-mm-dd  hh:ii:00"
                             data-link-field="examBeginTime" style="width: 270px">
                            <input class="form-control" size="16" type="text" value="" readonly>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
                        </div>
                        <input type="hidden" id="examBeginTime" name="examBeginTime" value=""/><br/>
                    </td>
                </tr>
                <tr>

                    <td>
                        <label for="examEndTime" class=" control-label" style="font-weight: normal;float: right;">开始时间：</label></td>
                    <td>
                        <div class="input-group date form_datetime" data-date="" data-date-format="yyyy-mm-dd  hh:ii:00"
                             data-link-field="examEndTime" style="width: 270px">
                            <input class="form-control" size="16" type="text" value="" readonly>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
                        </div>
                        <input type="hidden" id="examEndTime" name="examEndTime" value=""/><br/>
                    </td>

                </tr>
                <tr>

                    <td>

                        <label for="advanceTime" class="control-label" style="font-weight: normal;float: right;">允许提前交卷时间：</label></td>
                    <td>
                        <div class="input-group date form_time " data-date="" data-date-format="hh:ii:00" data-link-field="advanceTime"
                             data-link-format="hh:ii:00" style="width: 270px">
                            <input class="form-control" size="16" type="text" value="" readonly>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
                        </div>
                        <input type="hidden" id="advanceTime" name="advanceTime" value=""/><br/>
                    </td>

                </tr>
                <tr>

                    <td>

                        <label for="time" class="control-label" style="font-weight: normal;float: right;">考试时长：</label></td>
                    <td>
                        <div class="input-group date form_time " data-date="" data-date-format="hh:ii:00" data-link-field="time"
                             data-link-format="hh:ii:00" style="width: 270px">
                            <input class="form-control" size="16" type="text" value="" readonly>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
                        </div>
                        <input type="hidden" id="time" name="time" value=""/><br/>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        考试类型：
                    </td>
                    <td>
                        <select name="type" id="type" style="width: 250px;height: 40px;font-size: 18px;" class="form-control">
                            <option value="">---------请选择---------</option>
                            <option value="0">练习</option>
                            <option value="1">考试</option>
                            <option value="2">测试</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        考试组别：
                    </td>
                    <td>
                        <select name="teamName" id="teamName" style="width: 250px;height: 40px;font-size: 18px;" class="form-control">
                        </select>
                    </td>
                </tr>

                <tr>
                    <td align="right">
                        试卷：
                    </td>
                    <td>
                        <select name="testPaper" id="testPaper" style="width: 250px;height: 40px;font-size: 18px;" class="form-control">
                        </select>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        考试模式：
                    </td>
                    <td>
                        <div class="skin skin-line" >
                            <div class="skin-section" style="padding: 20px 0 0 13px;">
                                <ul class="list">
                                    <li>
                                        <input type="radio" name="mode" value="0" checked="checked" id="line-radio-1">
                                        <label for="line-radio-1">考试开始和结束时间固定</label>
                                    </li>
                                </ul>
                                <ul class="list">

                                    <li>
                                        <input type="radio" name="mode" value=" 1" id="line-radio-2">
                                        <label for="line-radio-2">考试时长固定</label>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        公开试题：
                    </td>
                    <td align="left">
                        <div class="skin skin-line" >
                            <div class="skin-section" style="padding: 20px 0 0 13px;">
                                <ul class="list">
                                    <li>
                                        <input type="radio" name="openTestPaper" value="1" checked="checked" id="line-radio-3">
                                        <label for="line-radio-3">公开</label>
                                    </li>
                                </ul>
                                <ul class="list">

                                    <li>
                                        <input type="radio" name="openTestPaper" value="0" id="line-radio-4">
                                        <label for="line-radio-4">不公开</label>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        公布成绩：
                    </td>
                    <td align="left">

                        <div class="skin skin-line" >
                            <div class="skin-section" style="padding: 20px 0 0 13px;">
                                <ul class="list">
                                    <li>
                                        <input type="radio" name="openScore" value="1" checked="checked" id="line-radio-5">
                                        <label for="line-radio-5">公布</label>
                                    </li>
                                </ul>
                                <ul class="list">

                                    <li>
                                        <input type="radio" name="openScore" value="0" id="line-radio-6">
                                        <label for="line-radio-6">不公布</label>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <input type="submit" name="sb" value="创建" onMouseOver="this.style.background='#2569c1'"
                               onmouseout="this.style.background='#114a93'" style="cursor:pointer;width:100px;height:30px;
                           font-weight:bold;margin:10px 0px 0px 150px;border: none;background: #2569c1;color: white;font-size: 16px;"/>

                        <input type="reset" name="s1b" value="清除" onMouseOver="this.style.background='#2569c1'"
                               onmouseout="this.style.background='#114a93'" style="cursor:pointer;width:100px;height:30px;
                           font-weight:bold;margin:10px 0px;border: none;background: #2569c1;color: white;font-size: 16px;"/>
                    </td>
                </tr>
            </table>
        </fieldset>
    </form>
</div>


<div id="footer">
    <p style="text-align: center;color: #757575;padding: 20px 0px 0px 0px; font:12px;">Copyright © 2010-2013 蓝天白云团队
        版权所有</p>
</div>
</body>
</html>
